import BaseService from './BaseService'

export default class MovieService extends BaseService {
  /**
   *  获取验证码
   */
  getCode(param) {
    const url = '/usercenter/login_sms_code'
    return this.post(url, param)
  }

  /**
   *  登录
   */
  login(param) {
    const url = `/usercenter/app/login/sms?telphone=${param.telphone}&smsCode=${
      param.smsCode
    }&businessType=19`
    return this.post(url)
  }

  top250(param) {
    const url = 'v2/movie/top250?start=0&count=3'
    return this.get(url, param)
  }

  comingSoon(param) {
    const url = '/v2/movie/coming_soon?start=0&count=3'
    return this.get(url, param)
  }

  inTheaters(param) {
    const url = '/v2/movie/in_theaters?start=0&count=3'
    return this.get(url, param)
  }
}
